home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / libraries / newiff.lha / NewIFF / NewIFF39.lha / newiff39 / iffp / gencat < prev    next >
AmigaDOS Script File  |  1993-09-28  |  2KB  |  56 lines

  1. .key basename/k,prefix/k,catname/k,leftid/k,killo/k
  2. ; Amiga script to generate xxxstrings.h from xxx.cd (here "iffp" is xxx)
  3. .def basename "iffp"
  4. .def prefix ""
  5. .def catname "iffp"
  6. .def leftid "5"
  7. .def killo " /modules/#?.o "
  8.  
  9. .bra {
  10. .ket }
  11.  
  12. ; make {basename}strings.h from {catname}.cd
  13. ; requires locale.library "catcomp" tool
  14. which >NIL: catcomp
  15. if warn
  16.     echo "Locale.library catcomp utility required - exiting..."
  17.     quit
  18. endif
  19.  
  20. ask "*NOK to delete dependent .o files ({killo}) <y or n> ? "
  21. if warn
  22.     echo "deleting dependent .o files"
  23.     delete {killo}
  24. else
  25.     echo "warning - your .o's may no longer match your strings"
  26. endif
  27.  
  28. echo "Creating {basename}strings.h header"
  29. catcomp {catname}.cd cfile={basename}strings.h
  30.  
  31. ; Create EDIT commands to insert {prefix} before TEXTTABLE and AppStrings
  32. ;echo  >ram:tempedcom{$$} "GB/TEXTTABLE/{prefix}/"
  33. ;echo >>ram:tempedcom{$$} "GB/AppStrings/{prefix}/"
  34. ;echo >>ram:tempedcom{$$} "GB/STRINGARRAY/{prefix}/"
  35.  
  36. ;echo "Performing automatic edit to add prefix: {prefix}"
  37. ;edit from {basename}strings.h to ram:tempstrings{$$}.h with ram:tempedcom{$$}
  38. ;copy ram:tempstrings{$$}.h {basename}strings.h
  39.  
  40. ;delete >NIL: ram:tempstrings{$$}.h ram:tempedcom{$$}
  41.  
  42. ;echo "Creating {basename}stringids.h"
  43. ;search >{basename}stringids.h {basename}strings.h " {leftid}0" nonum
  44. ;search >>{basename}stringids.h {basename}strings.h " {leftid}1" nonum
  45.  
  46. ;sample blank translation (.ct) creation line
  47. catcomp {catname}.cd ctfile={catname}.ct
  48.  
  49. echo "{basename}strings.h and blank {catname}.ct complete"
  50.  
  51. ;sample translation catalog creation line
  52. ;catcomp {catname}.cd translation=translations/francais/{catname}.ct catalog=catalogs/francais/{catname}.catalog
  53.  
  54. echo "*NRemember, if necesary, to copy {basename}strings.h to the actual"
  55. echo "include directory it is referenced from in your source code."
  56.